Обновить

IRCaBot: Modern solution for IRC chat logging

Время на прочтение 3 min
Количество просмотров 1.8K

Protocol IRC comparable to an ancient mammoth among the abundance of modern chats, but is an immortal classic. To this day, IRC is actively used as a tool for organizing chats among software developers. (freenode, libera chat and many others), as well as for organizing corporate chats that require ease of first launch and ease of maintenance.

For old-school developers, IRC has been a familiar tool since ancient times, and for corporate networks it is an easy tool for creating chat without user registration, databases and any hardware requirements. Figuratively speaking: a reliable machine, time-tested.

For what

IRC is scalable and incredibly lightweight, but with one big flaw: the user has no chat history from the time he was offline. For a specific user, there are solutions that ensure the accumulation of offline messages (ZNC, Quassel Core), but they are not suitable for storing the entire chat history and using it publicly. And there is a need for logging: how many corporate pearls and valuable conversations of developers pass without a trace! You can grumble for a long time about switching to Slack, Discord or Rocket Chat and even Jabber, but in many cases it makes sense to adapt to the solutions already in use.

What

IRCaBot (from Russian "Irka" and "bot") is a lightweight logger implemented in C++ (using the Qt library in the network part and inter-thread communication). The project is distributed under the free GPLv3 license. The application has a web interface for interaction with the end user and supports connection to an unlimited number of servers and channels, authorization of your nickname (via the NickServ service) and trigger commands for issuing specified responses in chat.

The web interface displays the status of connection to servers and a list of channels. For each chat, the current online chat is shown with a list of users. Nicknames in the log are highlighted in red or green, also depending on the presence of a particular user in the chat at the moment. This option may be useful when deciding whether to enter the chat.

The logs do not contain the exact time, since in most cases in IRC only the date is important. This feature is partly explained by the desire for privacy of chat participants, the log of which is published. For similar reasons, there is an option to hide messages from the log: messages starting with a dot appear in the log as the text "Blinded message" without their actual content.

IRCaBot does not use databases. Logs are stored as text files and sorted according to /сервер/канал/год/месяц/день.txt. Beautiful html is not always needed, so there is an option to take a log from the server in the form of a source text: for this, add a specific date to the URL line .txt .

Search. Where would we be without him? The web interface has a built-in ability to search by messages, including using regular expressions - the favorites of the main audience of the ancient messenger! The search is carried out in the current directory. For a global search across the entire existing chat history, you need to open the page with the root directory of the log (the one where you are asked to select the year). The search results are a link to a specific date with all messages that satisfy the request..

The web interface is made without JavaScript. Privacy paranoids are happy.

Resource consumption fits perfectly into the IRC paradigm: an application connected to several chats on two servers, with active use of the web interface, consumes less than 20MB of RAM and completely unnoticed cents of CPU time.

How

Source code and ready-made binaries (for Windows and Debian) can be found mainly git repositories, on either SourceForge. IRCaBot is a monolithic application. A binary file with a statically linked Qt library is distributed under Windows, so there are no additional dependencies, but for unix-like operating systems you will need to run a command like this (for Debian): sudo apt install qt5-default.

A configuration file is required to run. An example of a configuration file with comments can be obtained through the parameter --example OUTPUT_FILE_NAME. For more information on usage, please use the option --help (or -h).

Tags:
Hubs:
Всего голосов 6: ↑3 и ↓3 0
Комментарии 1

Comments 1

Right now I have forwarded Telegram to IRC so that anonymous people can write to me in the chat. Now I'm looking for a logger so that the chat can be seen via the web.

After a long search, I still couldn’t find a functioning public logger. So I just wanted to enter my email, add the bot to the channel, and that’s it. No, you'll have to run your own and keep it on all the time...

Only full-fledged users can leave comments. Sign in, Please.